Local-first LLM state branching, debugging & context capsules.
Treat AI context windows like a Git repo. Capture, visualize, branch, and regression-test LLM calls as a DAG β and offload context into encrypted, restorable capsules instead of truncating it. Free & local via Ollama, any OpenAI-compatible API, and MCP for agents. Zero config, no cloud, no account.
The dashboard: a conversation tree with a branch off the root, the node inspector (request/response, tokens, provenance), and the Fork dialog.
Every LLM call is a node in a DAG. Fork an alternative prompt or model from any historical turn.
Defaults to open-source models via Ollama. No API key, no database, no telemetry.
Provider-agnostic proxy. OpenAI, Groq, OpenRouter, Together, LM Studio, vLLM, Anthropic.
Bytes pass through untouched; the proxy reconstructs the full message β text and tool calls.
An agent can query its own history mid-task β recall attempts, trace lineage, self-correct.
Pin good outputs as baselines, re-run after prompt tweaks, catch drift in CI.
Offload context as an immutable, AES-256-GCM-encrypted DAG. Save β verify β compact; restore full or per segment; crypto-shred to forget.
Redundant Array of Independent DAGs: mirror capsules across disks with self-healing restore. Keys never replicated.
# 1. a free local model (install Ollama from ollama.com)
ollama pull llama3
# 2. start ForkMind (proxy + dashboard on :4500)
npx github:medhovarsh/forkmind start
# 3. point your OpenAI client at the proxy
# baseURL: http://localhost:4500/v1
# open http://localhost:4500 for the dashboard
ForkMind is a local-first tool that treats AI context windows like a Git repository. It captures every LLM call into a local .forkmind directory, visualizes the conversation as a Directed Acyclic Graph (DAG), and lets you branch alternative prompts or models from any historical turn β all on your machine, no cloud, no account.
Yes. ForkMind is MIT-licensed and runs entirely on your machine. It defaults to free, open-source models via Ollama β no API key, no database, no telemetry.
ForkMind is a provider-agnostic proxy. It works with any OpenAI-compatible API, including Ollama, OpenAI, Anthropic, Groq, OpenRouter, Together, LM Studio, and vLLM.
ForkMind runs straight from its git link β no npm registry needed. Run npx github:medhovarsh/forkmind start to launch the proxy and dashboard on port 4500, then point your OpenAI client at http://localhost:4500/v1.
ForkMind exposes an MCP (Model Context Protocol) server with tools for history (recent turns, lineage, branches, search) and context capsules (save, digest, restore, forget, replica health). An agent can recall previous attempts mid-task, self-correct, archive finished context to shrink its window, and restore it later.
Capsules save conversation context as an immutable, encrypted DAG snapshot on disk so it can be removed from the live model window instead of truncated and lost. Segments are content-addressed (hashed over content + parents, like Git) β immutable and acyclic by construction. AES-256-GCM encryption with keys stored outside the data directory. Restore in full or one segment at a time. The workflow is save β verify on disk β compact: nothing is dropped until it is provably persisted.
Crypto-shredding: forgetting a capsule destroys its encryption key first, tombstones the id so identical content can never resurrect it, then removes ciphertext everywhere β including replicas. Backups of the ciphertext stay unreadable because the key is gone.
Redundant Array of Independent DAGs. Mirror capsules to extra filesystem targets (second disk, synced folder, network mount). Replicas hold ciphertext + manifests only β keys are never replicated. On primary loss or bit-rot, restore self-heals from the first replica that passes verification; tombstones propagate on sync.
No. ForkMind operates entirely at the context-assembly layer β it changes what the client sends, never the provider, model weights, or KV cache. Offloading just means the provider receives a shorter message list plus a one-line capsule handle.